﻿using BBICMS.Model.Security;
using BBICMS.Repository;
using System.Threading.Tasks;
using BBICMS.Model.ViewModel.Identity;
using System.Threading;
using System;
using System.Collections.Generic;

namespace BBICMS.Data.Repositories.Identity
{
    public interface IUserRepository : IRepository<User>
    {
        Task<User> SignIn(LoginVM model, CancellationToken cancellationToken = default(CancellationToken));


        int SearchUsersCount(string username, DateTime? startDate, DateTime? endDate);
        IEnumerable<User> SearchUsers(int pageIndex, int pageSize, string username, DateTime? startDate, DateTime? endDate);
        bool SetPassword(Guid userId, string password);
        int ChangePassword(Guid userId, string oldPassword, string newPassword);
        bool IsEmailUniqueAtEdit(string email, Guid id);
        Task<User> GetUserByName(string userName, CancellationToken cancellationToken = default(CancellationToken));
        Task<User> GetUserByEmail(string email, CancellationToken cancellationToken = default(CancellationToken));
        int Register(RegisterVM user);
        //List<Menu> GetUserMenus(Guid userId);
        //User FindUserByEmail(string email);
    }
}